import 'dart:io';

import 'package:flutter/cupertino.dart';
import 'package:flutter_base_plugin/base_library/base/base_function.dart';
import 'package:flutter_base_plugin_example/page/category/category_left.dart';
import 'package:flutter_base_plugin_example/page/category/category_right.dart';
import 'package:flutter_base_plugin_example/page/category/vm/categoty_view_model.dart';

class CategoryPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return _categoryPageState();
  }
}

class _categoryPageState
    extends BaseProviderState<CategoryViewModel, CategoryPage> {
  @override
  void buildCreate() {
    // TODO: implement buildCreate
    if (Platform.isAndroid) {
      // CommonUtils.showToast("android");
      bottomVertical = 56;
    } else {
      // CommonUtils.showToast("ios");
      bottomVertical = 92;
    }
    setAppBarTitle("商品分类");
    hideBackIcon();
  }

  @override
  CategoryViewModel buildViewModel() {
    // TODO: implement buildViewModel
    return CategoryViewModel();
  }

  @override
  Widget buildWidget(CategoryViewModel viewModel, BuildContext context) {
    // TODO: implement buildWidget
    return Row(
      children: [
        CategoryLeft(context),
        // CategoryRight(context),
        CategoryRight(),
      ],
    );
  }
}
